package com.scwatch.core.service;

import com.scwatch.core.domain.*;

import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * InfoService
 *
 * @author gjl
 */
public interface InfoService {
    public Info save(Info bean, InfoDetail detail, Integer[] nodeIds,
                     Integer[] specialIds, Integer[] viewGroupIds, Integer[] viewOrgIds,Integer[]voteIds,
                     Map<String, String> customs, Map<String, String> clobs,
                     List<InfoImage> images, List<InfoFile> files, Integer[] attrIds,
                     Map<String, String> attrImages, String[] tagNames, Integer nodeId,
                     Integer creatorId, String status, Integer siteId);

    public Info update(Info bean, InfoDetail detail, Integer[] nodeIds,
                       Integer[] specialIds, Integer[] viewGroupIds, Integer[] viewOrgIds,Integer[]voteIds,
                       Map<String, String> customs, Map<String, String> clobs,
                       List<InfoImage> images, List<InfoFile> files, Integer[] attrIds,
                       Map<String, String> attrImages, String[] tagNames, Integer nodeId,
                       User operator, boolean pass, boolean isContribute);

    public List<Info> pass(Integer[] ids, Integer userId, String opinion);

    public List<Info> reject(Integer[] ids, Integer userId, String opinion,
                             boolean rejectEnd);

    public List<Info> move(Integer[] ids, Integer nodeId);

    public int moveByNodeId(Collection<Integer> nodeIds, Integer nodeId);

    public List<Info> logicDelete(Integer[] ids);

    public List<Info> recall(Integer[] ids);

    public List<Info> archive(Integer[] ids);

    public List<Info> antiArchive(Integer[] ids);

    public Info delete(Integer id);

    public List<Info> delete(Integer[] ids);

    public int publish(Integer siteId);

    public int tobePublish(Integer siteId);

    public int expired(Integer siteId);

    public List<Info> updateInfoRef(Integer[] infoIds, Integer nodeId,Integer orderId);

    public void updatePublishDate(Integer infoId,Date publishDate);

    public void updateOrder(Integer order,Integer infoId);

    public void updateSelect(Integer select,Integer infoId);

    public Info updateRefLive(Info bean);

    public void pubCityInfo(List<Info> beans,Integer pubCityNode,Integer userId);

    public void genCityNodeTiming(Integer siteId);

    public void pubCityInfoQueue(String text);

    /**
     * 保存新闻时，再保存到一个或多个市州栏目
     * @param cityNodes 市州栏目id
     * @param sourceInfo 新闻
     */
    public void saveInfoToCityNode(String cityNodes,Info sourceInfo);

//    public void updateHtmlThread(final Integer infoId,final boolean toDelete,final String method);
//
//    public void batchupdateHtmlThread(final List<Integer> beanids,final boolean toDelete, final String method);


//    public List queryInfo(Integer id);

    public Info getInfoById(Integer id);

}
